package io.summer.gadget.channel.core.impl;

import io.summer.gadget.channel.core.ServerChooser;

import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

public class DefaultServerChooser implements ServerChooser {
  @Override
  public String choose(String appName, List<String> servers) {
    return servers.get(ThreadLocalRandom.current().nextInt(servers.size()));
  }
}
